/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MatrixCalculation;

/**
 *
 * @author Ekantik
 */
public class MatrixMultiplication {

    private  int intResult[][];
    private  double doubleResult[][];
    private  int rows,columns;
   
    public MatrixMultiplication(double  a[][],double b[][],int r, int c){
        this.rows = r;
        this.columns = c;
        this.doubleResult = new double[rows][columns];
	for(int i=0;i<rows;i++){
            for(int j=0;j<columns;j++){
		doubleResult[i][j]=0;
		for(int k=0;k<c;k++){
                    doubleResult[i][j]+=a[i][k]*b[k][j];
                }
            }
	}
    }

    public int[][] getIntResult() {
        return intResult;
    }

    public void setIntResult(int[][] intResult) {
        this.intResult = intResult;
    }

    public double[][] getDoubleResult() {
        return doubleResult;
    }

    public void setDoubleResult(double[][] doubleResult) {
        this.doubleResult = doubleResult;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public int getColumns() {
        return columns;
    }

    public void setColumns(int columns) {
        this.columns = columns;
    }
    public static void main(String args[]){
        RatingMatrix rm = new RatingMatrix();
        SimilarityMatrix sm = new SimilarityMatrix(rm);
        sm.setRm(rm);
        sm.prepareMean(rm);
        sm.calculateSim();
        sm.scaledSimilarityMatrix();
        //MatrixMultiplication mm = new MatrixMultiplication(sm.getSimilarityMatrix(), rm.getRatMatrix(),rm.getNoOfServices(),rm.getNoOfUsers());
        
    }
    
}
